// ImageTIF.h: interface for the CImageTIF class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_IMAGETIF_H__BFDFC953_DFF5_442F_9EAB_01444444444270F__INCLUDED_)
#define AFX_IMAGETIF_H__BFDFC953_DFF5_442F_9EAB_01444444444270F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "DDBufferBlock.h"
#include "DD_ImgCfg.h"

class CImageTIF  
{
public:
	CImageTIF();
	virtual ~CImageTIF();

public:
	int GetImgBitPerSap(char *pFileName,int &nBitsPerSample);
	int OpenImgFile(char *pFileName,zkImgBitInfo *pImage);
	int OpenImgFile(char *pFileName,zkImgBitInfo *pImage,DDBufferBlock *pBufBlock);
	int SaveImgFile(char *pFileName,zkImgBitInfo *pImage);

public:
	int GetDescription(char *pFileName,char **pDesc);
	int CloseFile();

private:
	TIFF* TIFFOpenEx(CxFile *hFile,char* mode = "rb");
    void ReadBit16Tiff(TIFF *pTif,zkImg16BitInfo **ppImgInfo);

private:
	TIFF *m_pTif;
	FILE *m_hFile;
};

#endif // !defined(AFX_IMAGETIF_H__BFDFC953_DFF5_442F_9EAB_015361FF270F__INCLUDED_)
